package com.zhangcong.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhangcong.mapper.LibBookMapper;
import com.zhangcong.domain.LibBook;
import com.zhangcong.service.ILibBookService;
import com.ruoyi.common.core.text.Convert;

/**
 * 图书信息Service业务层处理
 * 
 * @author zhangcong
 * @date 2023-05-24
 */
@Service
public class LibBookServiceImpl implements ILibBookService 
{
    @Autowired
    private LibBookMapper libBookMapper;

    /**
     * 查询图书信息
     * 
     * @param id 图书信息主键
     * @return 图书信息
     */
    @Override
    public LibBook selectLibBookById(Integer id)
    {
        return libBookMapper.selectLibBookById(id);
    }

    /**
     * 查询图书信息列表
     * 
     * @param libBook 图书信息
     * @return 图书信息
     */
    @Override
    public List<LibBook> selectLibBookList(LibBook libBook)
    {
        return libBookMapper.selectLibBookList(libBook);
    }

    /**
     * 新增图书信息
     * 
     * @param libBook 图书信息
     * @return 结果
     */
    @Override
    public int insertLibBook(LibBook libBook)
    {
        return libBookMapper.insertLibBook(libBook);
    }

    /**
     * 修改图书信息
     * 
     * @param libBook 图书信息
     * @return 结果
     */
    @Override
    public int updateLibBook(LibBook libBook)
    {
        return libBookMapper.updateLibBook(libBook);
    }

    /**
     * 批量删除图书信息
     * 
     * @param ids 需要删除的图书信息主键
     * @return 结果
     */
    @Override
    public int deleteLibBookByIds(String ids)
    {
        return libBookMapper.deleteLibBookByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除图书信息信息
     * 
     * @param id 图书信息主键
     * @return 结果
     */
    @Override
    public int deleteLibBookById(Integer id)
    {
        return libBookMapper.deleteLibBookById(id);
    }

    @Override
    public List<Map> queryYDRS() {
        return libBookMapper.queryYDRS();
    }

    @Override
    public List<Map> querySJRS() {
        return libBookMapper.querySJRS();
    }
}
